/*    */ package com.lmpop.createIndex.search;
/*    */ 
/*    */ import com.lmpop.createIndex.searchModel.SearchData;
/*    */ import java.io.IOException;
/*    */ import java.util.ArrayList;
/*    */ import java.util.Hashtable;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ 
/*    */ public class _8diansckeywordIndexFiles
/*    */ {
/*    */   public ProperUtil properUtil;
/*    */   private String file_path;
/*    */ 
/*    */   public _8diansckeywordIndexFiles()
/*    */   {
/* 21 */     this.properUtil = new ProperUtil();
/* 22 */     this.file_path = this.properUtil.getFilePathByModel("_8diansckeyword");
/*    */   }
/*    */ 
/*    */   public List getSearchKeyInfo(Map paraMap) throws IOException {
/* 26 */     ArrayList showList = new ArrayList();
/* 27 */     SearchData search = new SearchData();
/* 28 */     ArrayList paraList = new ArrayList();
/* 29 */     showList = search.getSearchInfo(this.file_path, paraList);
/* 30 */     return showList;
/*    */   }
/*    */ 
/*    */   public ArrayList<Hashtable<String, String>> getKeyWordList(String key, String key_type, int limit)
/*    */     throws IOException
/*    */   {
/* 36 */     SearchData search = new SearchData();
/* 37 */     ArrayList paraList = new ArrayList();
/* 38 */     ArrayList keywordList = new ArrayList();
/* 39 */     ArrayList keyList = search.getSearchInfo(this.file_path, paraList);
/*    */ 
/* 41 */     if ((keyList != null) && (keyList.size() > 0)) {
/* 42 */       for (int i = 0; i < keyList.size(); i++)
/*    */       {
/* 44 */         if (i == limit) {
/*    */           break;
/*    */         }
/* 47 */         Hashtable map = (Hashtable)keyList.get(i);
/* 48 */         String cat_attr = map.get("cat_attr").toString();
/* 49 */         String keywords = map.get("keywords").toString();
/* 50 */         Hashtable mapkey = new Hashtable();
/* 51 */         mapkey.put("cat_attr", cat_attr);
/* 52 */         mapkey.put("keywords", keywords);
/* 53 */         keywordList.add(mapkey);
/*    */       }
/*    */     }
/*    */ 
/* 57 */     return keywordList;
/*    */   }
/*    */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.createIndex.search._8diansckeywordIndexFiles
 * JD-Core Version:    0.6.0
 */